package com.house.controller;


import com.house.service.LeaseService;
import com.house.util.LoginUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;


@Controller
public class WebController {



    @Autowired
    LeaseService leaseService;



    /**
     * 网站首页
     * @return
     */
    @GetMapping("/")
    public String manage(Model model, HttpServletRequest request) {
        if(LoginUtil.checkAgentIsMobile(request)) {
            return "mobile/index";
        } else {
            return "pc/index";
        }
    }




}
